home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1998 November / Freeware November 1998.img / dist / fw_emacs.idb / usr / freeware / info / vip-1.z / vip-1 (.txt)
GNU Info File  |  1998-10-27  |  50KB  |  999 lines

  1. This is Info file ../info/vip, produced by Makeinfo-1.55 from the input
  2. file vip.texi.
  3. Distribution
  4. ************
  5.    Copyright (C) 1987 Masahiko Sato.
  6.    Permission is granted to make and distribute verbatim copies of this
  7. manual provided the copyright notice and this permission notice are
  8. preserved on all copies.
  9.    Permission is granted to copy and distribute modified versions of
  10. this manual under the conditions for verbatim copying, provided that
  11. the entire resulting derived work is distributed under the terms of a
  12. permission notice identical to this one.
  13.    Permission is granted to copy and distribute translations of this
  14. manual into another language, under the same conditions as for modified
  15. versions.
  16. File: vip,  Node: Top,  Next: Survey,  Up: (DIR)
  17.    VIP is a Vi emulating package written in Emacs Lisp.  VIP implements
  18. most Vi commands including Ex commands.  It is therefore hoped that
  19. this package will enable you to do Vi style editing under the powerful
  20. GNU Emacs environment.  This info file describes the usage of VIP
  21. assuming that you are fairly accustomed to Vi but not so much with
  22. Emacs.  Also we will concentrate mainly on differences from Vi,
  23. especially features unique to VIP.
  24.    It is recommended that you read nodes on survey and on customization
  25. before you start using VIP.  Other nodes may be visited as needed.
  26.    Comments and bug reports are welcome.  Please send messages to
  27. `ms@Sail.Stanford.Edu' if you are outside of Japan and to
  28. `masahiko@sato.riec.tohoku.junet' if you are in Japan.
  29. * Menu:
  30. * Survey::        A survey of VIP.
  31. * Vi Commands::        Details of Vi commands.
  32. * Ex Commands::        Details of Ex commands.
  33. * Customization::    How to customize VIP.
  34. File: vip,  Node: Survey,  Next: Basic Concepts,  Prev: Top,  Up: Top
  35. A Survey of VIP
  36. ***************
  37.    In this chapter we describe basics of VIP with emphasis on the
  38. features not found in Vi and on how to use VIP under GNU Emacs.
  39. * Menu:
  40. * Basic Concepts::    Basic concepts in Emacs.
  41. * Loading VIP::        How to load VIP automatically.
  42. * Modes in VIP::    VIP has three modes, which are orthogonal to modes
  43.             in Emacs.
  44. * Differences from Vi:: Differences of VIP from Vi is explained.
  45. File: vip,  Node: Basic Concepts,  Next: Loading VIP,  Prev: Survey,  Up: Survey
  46. Basic Concepts
  47. ==============
  48.    We begin by explaining some basic concepts of Emacs.  These concepts
  49. are explained in more detail in the GNU Emacs Manual.
  50.    Conceptually, a "buffer" is just a string of ASCII characters and two
  51. special characters PNT ("point") and MRK ("mark") such that the
  52. character PNT occurs exactly once and MRK occurs at most once.  The
  53. "text" of a buffer is obtained by deleting the occurrences of PNT and
  54. MRK.  If, in a buffer, there is a character following PNT then we say
  55. that point is "looking at" the character; otherwise we say that point
  56. is "at the end of buffer".  PNT and MRK are used to indicate positions
  57. in a buffer and they are not part of the text of the buffer.  If a
  58. buffer contains a MRK then the text between MRK and PNT is called the
  59. "region" of the buffer.
  60.    Emacs provides (multiple) "windows" on the screen, and you can see
  61. the content of a buffer through the window associated with the buffer.
  62. The cursor of the screen is always positioned on the character after
  63.    A "keymap" is a table that records the bindings between characters
  64. and command functions.  There is the "global keymap" common to all the
  65. buffers.  Each buffer has its "local keymap" that determines the "mode"
  66. of the buffer.  Local keymap overrides global keymap, so that if a
  67. function is bound to some key in the local keymap then that function
  68. will be executed when you type the key.  If no function is bound to a
  69. key in the local map, however, the function bound to the key in the
  70. global map becomes in effect.
  71. File: vip,  Node: Loading VIP,  Next: Modes in VIP,  Prev: Basic Concepts,  Up: Survey
  72. Loading VIP
  73. ===========
  74.    The recommended way to load VIP automatically is to include the line:
  75.      (load "vip")
  76. in your `.emacs' file.  The `.emacs' file is placed in your home
  77. directory and it will be executed every time you invoke Emacs.  If you
  78. wish to be in vi mode whenever Emacs starts up, you can include the
  79. following line in your `.emacs' file instead of the above line:
  80.      (setq term-setup-hook 'vip-mode)
  81. (*Note Vi Mode::, for the explanation of vi mode.)
  82.    Even if your `.emacs' file does not contain any of the above lines,
  83. you can load VIP and enter vi mode by typing the following from within
  84. Emacs.
  85.      M-x vip-mode
  86. File: vip,  Node: Modes in VIP,  Next: Emacs Mode,  Prev: Loading VIP,  Up: Survey
  87. Modes in VIP
  88. ============
  89. Loading VIP has the effect of globally binding `C-z' (`Control-z') to
  90. the function `vip-change-mode-to-vi'. The default binding of `C-z' in
  91. GNU Emacs is `suspend-emacs', but, you can also call `suspend-emacs' by
  92. typing `C-x C-z'.  Other than this, all the key bindings of Emacs
  93. remain the same after loading VIP.
  94.    Now, if you hit `C-z', the function `vip-change-mode-to-vi' will be
  95. called and you will be in "vi mode".  (Some major modes may locally bind
  96. `C-z' to some special functions.  In such cases, you can call
  97. `vip-change-mode-to-vi' by `execute-extended-command' which is invoked
  98. by `M-x'.  Here `M-x' means `Meta-x', and if your terminal does not
  99. have a META key you can enter it by typing `ESC x'.  The same effect
  100. can also be achieve by typing `M-x vip-mode'.)
  101.    You can observe the change of mode by looking at the "mode line".
  102. For instance, if the mode line is:
  103.      -----Emacs: *scratch*              (Lisp Interaction)----All------------
  104. then it will change to:
  105.      -----Vi:    *scratch*              (Lisp Interaction)----All------------
  106. Thus the word `Emacs' in the mode line will change to `Vi'.
  107.    You can go back to the original "emacs mode" by typing `C-z' in vi
  108. mode.  Thus `C-z' toggles between these two modes.
  109.    Note that modes in VIP exist orthogonally to modes in Emacs.  This
  110. means that you can be in vi mode and at the same time, say, shell mode.
  111.    Vi mode corresponds to Vi's command mode.  From vi mode you can enter
  112. "insert mode" (which corresponds to Vi's insert mode) by usual Vi
  113. command keys like `i', `a', `o' ... etc.
  114.    In insert mode, the mode line will look like this:
  115.      -----Insert *scratch*              (Lisp Interaction)----All------------
  116. You can exit from insert mode by hitting ESC key as you do in Vi.
  117.    That VIP has three modes may seem very complicated, but in fact it
  118. is not so.  VIP is implemented so that you can do most editing
  119. remaining only in the two modes for Vi (that is vi mode and insert
  120. mode).
  121.    The figure below shows the transition of three modes in VIP.
  122.                 === C-z ==>          == i,o ... ==>
  123.      emacs mode             vi mode                 insert mode
  124.                 <== X-z ===          <=== ESC ====
  125. * Menu:
  126. * Emacs Mode::        This is the mode you should know better.
  127. * Vi Mode::        Vi commands are executed in this mode.
  128. * Insert Mode::        You can enter text, and also can do editing if you
  129.             know enough Emacs commands.
  130. File: vip,  Node: Emacs Mode,  Next: Vi Mode,  Prev: Modes in VIP,  Up: Modes in VIP
  131. Emacs Mode
  132. ----------
  133.    You will be in this mode just after you loaded VIP.  You can do all
  134. normal Emacs editing in this mode.  Note that the key `C-z' is globally
  135. bound to `vip-change-mode-to-vi'.  So, if you type `C-z' in this mode
  136. then you will be in vi mode.
  137. File: vip,  Node: Vi Mode,  Next: Insert Mode,  Prev: Emacs Mode,  Up: Modes in VIP
  138. Vi Mode
  139. -------
  140.    This mode corresponds to Vi's command mode.  Most Vi commands work
  141. as they do in Vi.  You can go back to emacs mode by typing `C-z'.  You
  142. can enter insert mode, just as in Vi, by typing `i', `a' etc.
  143. File: vip,  Node: Insert Mode,  Next: Differences from Vi,  Prev: Vi Mode,  Up: Modes in VIP
  144. Insert Mode
  145. -----------
  146.    The key bindings in this mode is the same as in the emacs mode
  147. except for the following 4 keys.  So, you can move around in the buffer
  148. and change its content while you are in insert mode.
  149. `ESC'
  150.      This key will take you back to vi mode.
  151. `C-h'
  152.      Delete previous character.
  153. `C-w'
  154.      Delete previous word.
  155. `C-z'
  156.      Typing this key has the same effect as typing ESC in emacs mode.
  157.      Thus typing `C-z x' in insert mode will have the same effect as
  158.      typing `ESC x' in emacs mode.
  159. File: vip,  Node: Differences from Vi,  Next: Undoing,  Prev: Insert Mode,  Up: Survey
  160. Differences from Vi
  161. ===================
  162.    The major differences from Vi are explained below.
  163. * Menu:
  164. * Undoing::        You can undo more in VIP.
  165. * Changing::        Commands for changing the text.
  166. * Searching::        Search commands.
  167. * z Command::        You can now use zH, zM and zL as well as z- etc.
  168. * Counts::        Some Vi commands which do not accept a count now
  169.             accept one.
  170. * Marking::        You can now mark the current point, beginning of
  171.             the buffer etc.
  172. * Region Commands::    You can now give a region as an argument for delete
  173.             commands etc.
  174. * New Commands::    Some new commands not available in Vi are added.
  175. * New Bindings::    Bindings of some keys are changed for the
  176.             convenience of editing under Emacs.
  177. * Window Commands::    Commands for moving among windows etc.
  178. * Buffer Commands::    Commands for selecting buffers etc.
  179. * File Commands::    Commands for visiting files etc.
  180. * Misc Commands::    Other useful commands.
  181. File: vip,  Node: Undoing,  Next: Changing,  Prev: Differences from Vi,  Up: Differences from Vi
  182. Undoing
  183. -------
  184.    You can repeat undoing by the `.' key.  So, `u' will undo a single
  185. change, while `u . . .', for instance, will undo 4 previous changes.
  186. Undo is undoable as in Vi.  So the content of the buffer will be the
  187. same before and after `u u'.
  188. File: vip,  Node: Changing,  Next: Searching,  Prev: Undoing,  Up: Differences from Vi
  189. Changing
  190. --------
  191.    Some commands which change a small number of characters are executed
  192. slightly differently.  Thus, if point is at the beginning of a word
  193. `foo' and you wished to change it to `bar' by typing `c w', then VIP
  194. will prompt you for a new word in the minibuffer by the prompt `foo =>
  195. '.  You can then enter `bar' followed by RET or ESC to complete the
  196. command.  Before you enter RET or ESC you can abort the command by
  197. typing `C-g'.  In general, you can abort a partially formed command by
  198. typing `C-g'.
  199. File: vip,  Node: Searching,  Next: z Command,  Prev: Changing,  Up: Differences from Vi
  200. Searching
  201. ---------
  202.    As in Vi, searching is done by `/' and `?'.  The string will be
  203. searched literally by default.  To invoke a regular expression search,
  204. first execute the search command `/' (or `?') with empty search string.
  205. (I.e, type `/' followed by RET.) A search for empty string will toggle
  206. the search mode between vanilla search and regular expression search.
  207. You cannot give an offset to the search string.  (It is a limitation.)
  208. By default, search will wrap around the buffer as in Vi.  You can
  209. change this by rebinding the variable `vip-search-wrap-around'.  *Note
  210. Customization::, for how to do this.
  211. File: vip,  Node: z Command,  Next: Counts,  Prev: Searching,  Up: Differences from Vi
  212. z Command
  213. ---------
  214.    For those of you who cannot remember which of `z' followed by RET,
  215. `.' and `-' do what.  You can also use `z' followed by `H', `M' and `L'
  216. to place the current line in the Home (Middle, and Last) line of the
  217. window.
  218. File: vip,  Node: Counts,  Next: Marking,  Prev: z Command,  Up: Differences from Vi
  219. Counts
  220. ------
  221.    Some Vi commands which do not accept a count now accept one
  222.      Given counts, text will be yanked (in Vi's sense) that many times.
  223.      Thus `3 p' is the same as `p p p'.
  224.      Given counts, that many copies of text will be inserted. Thus `o a
  225.      b c ESC' will insert 3 lines of `abc' below the current line.
  226.      Given a count N, N-th occurrence will be searched.
  227. File: vip,  Node: Marking,  Next: Region Commands,  Prev: Counts,  Up: Differences from Vi
  228. Marking
  229. -------
  230.    Typing an `m' followed by a lower case character CH marks the point
  231. to the register named CH as in Vi.  In addition to these, we have
  232. following key bindings for marking.
  233. `m <'
  234.      Set mark at the beginning of buffer.
  235. `m >'
  236.      Set mark at the end of buffer.
  237. `m .'
  238.      Set mark at point (and push old mark on mark ring).
  239. `m ,'
  240.      Jump to mark (and pop mark off the mark ring).
  241. File: vip,  Node: Region Commands,  Next: New Commands,  Prev: Marking,  Up: Differences from Vi
  242. Region Commands
  243. ---------------
  244.    Vi operators like `d', `c' etc. are usually used in combination with
  245. motion commands.  It is now possible to use current region as the
  246. argument to these operators.  (A "region" is a part of buffer delimited
  247. by point and mark.)  The key `r' is used for this purpose.  Thus `d r'
  248. will delete the current region.  If `R' is used instead of `r' the
  249. region will first be enlarged so that it will become the smallest
  250. region containing the original region and consisting of whole lines.
  251. Thus `m . d R' will have the same effect as `d d'.
  252. File: vip,  Node: New Commands,  Next: New Bindings,  Prev: Region Commands,  Up: Differences from Vi
  253. Some New Commands
  254. -----------------
  255.    Note that the keys below (except for `R') are not used in Vi.
  256. `C-a'
  257.      Move point to the beginning of line.
  258. `C-n'
  259.      If you have two or more windows in the screen, this key will move
  260.      point to the next window.
  261. `C-o'
  262.      Insert a newline and leave point before it, and then enter insert
  263.      mode.
  264. `C-r'
  265.      Backward incremental search.
  266. `C-s'
  267.      Forward incremental search.
  268. `C-c'
  269. `C-x'
  270. `ESC'
  271.      These keys will exit from vi mode and return to emacs mode
  272.      temporarily.  If you hit one of these keys, Emacs will be in emacs
  273.      mode and will believe that you hit that key in emacs mode. For
  274.      example, if you hit `C-x' followed by `2', then the current window
  275.      will be split into 2 and you will be in vi mode again.
  276.      Escape to emacs mode.  Hitting `\' will take you to emacs mode,
  277.      and you can execute a single Emacs command.  After executing the
  278.      Emacs command you will be in vi mode again.  You can give a count
  279.      before typing `\'.  Thus `5 \ *', as well as `\ C-u 5 *', will
  280.      insert `*****' before point.  Similarly `1 0 \ C-p' will move the
  281.      point 10 lines above the current line.
  282.      Kill current buffer if it is not modified.  Useful when you
  283.      selected a buffer which you did not want.
  284.      `Q' is for query replace and `R' is for replace.  By default,
  285.      string to be replaced are treated literally.  If you wish to do a
  286.      regular expression replace, first do replace with empty string as
  287.      the string to be replaced.  In this way, you can toggle between
  288.      vanilla and regular expression replacement.
  289.      These keys are used to Visit files.  `v' will switch to a buffer
  290.      visiting file whose name can be entered in the minibuffer. `V' is
  291.      similar, but will use window different from the current window.
  292.      If followed by a certain character CH, it becomes an operator whose
  293.      argument is the region determined by the motion command that
  294.      follows.  Currently, CH can be one of `c', `C', `g', `q' and `s'.
  295. `# c'
  296.      Change upper case characters in the region to lower case
  297.      (`downcase-region').
  298. `# C'
  299.      Change lower case characters in the region to upper case. For
  300.      instance, `# C 3 w' will capitalize 3 words from the current point
  301.      (`upcase-region').
  302. `# g'
  303.      Execute last keyboard macro for each line in the region
  304.      (`vip-global-execute').
  305. `# q'
  306.      Insert specified string at the beginning of each line in the region
  307.      (`vip-quote-region').
  308. `# s'
  309.      Check spelling of words in the region (`spell-region').
  310.      Call last keyboard macro.
  311. File: vip,  Node: New Bindings,  Next: Window Commands,  Prev: New Commands,  Up: Differences from Vi
  312. New Key Bindings
  313. ----------------
  314.    In VIP the meanings of some keys are entirely different from Vi.
  315. These key bindings are done deliberately in the hope that editing under
  316. Emacs will become easier.  It is however possible to rebind these keys
  317. to functions which behave similarly as in Vi.  *Note Customizing Key
  318. Bindings::, for details.
  319. `C-g'
  320.      In Vi, `C-g' is used to get information about the file associated
  321.      to the current buffer.  Here, `g' will do that, and `C-g' is used
  322.      to abort a command (this is for compatibility with emacs mode.)
  323. `SPC'
  324. `RET'
  325.      Now these keys will scroll up and down the text of current window.
  326.      Convenient for viewing the text.
  327.      They are used to switch to a specified buffer.  Useful for
  328.      switching to already existing buffer since buffer name completion
  329.      is provided.  Also a default buffer will be given as part of the
  330.      prompt, to which you can switch by just typing RET key.  `s' is
  331.      used to select buffer in the current window, while `S' selects
  332.      buffer in another window.
  333.      These keys will exit from vi mode and return to emacs mode
  334.      temporarily.  If you type `C' (`X'), Emacs will be in emacs mode
  335.      and will believe that you have typed `C-c' (`C-x', resp.) in emacs
  336.      mode. Moreover, if the following character you type is an upper
  337.      case letter, then Emacs will believe that you have typed the
  338.      corresponding control character.  You will be in vi mode again
  339.      after the command is executed.  For example, typing `X S' in vi
  340.      mode is the same as typing `C-x C-s' in emacs mode.  You get the
  341.      same effect by typing `C-x C-s' in vi mode, but the idea here is
  342.      that you can execute useful Emacs commands without typing control
  343.      characters. For example, if you hit `X' (or `C-x') followed by
  344.      `2', then the current window will be split into 2 and you will be
  345.      in vi mode again.
  346.    In addition to these, `ctl-x-map' is slightly modified:
  347. `X 3'
  348. `C-x 3'
  349.      This is equivalent to `C-x 1 C-x 2' (1 + 2 = 3).
  350. File: vip,  Node: Window Commands,  Next: Buffer Commands,  Prev: New Bindings,  Up: Differences from Vi
  351. Window Commands
  352. ---------------
  353.    In this and following subsections, we give a summary of key bindings
  354. for basic functions related to windows, buffers and files.
  355. `C-n'
  356.      Switch to next window.
  357. `X 1'
  358. `C-x 1'
  359.      Delete other windows.
  360. `X 2'
  361. `C-x 2'
  362.      Split current window into two windows.
  363. `X 3'
  364. `C-x 3'
  365.      Show current buffer in two windows.
  366. File: vip,  Node: Buffer Commands,  Next: File Commands,  Prev: Window Commands,  Up: Differences from Vi
  367. Buffer Commands
  368. ---------------
  369.      Switch to the specified buffer in the current window
  370.      (`vip-switch-to-buffer').
  371.      Switch to the specified buffer in another window
  372.      (`vip-switch-to-buffer-other-window').
  373.      Kill the current buffer if it is not modified.
  374. `X S'
  375. `C-x C-s'
  376.      Save the current buffer in the file associated to the buffer.
  377. File: vip,  Node: File Commands,  Next: Misc Commands,  Prev: Buffer Commands,  Up: Differences from Vi
  378. File Commands
  379. -------------
  380.      Visit specified file in the current window.
  381.      Visit specified file in another window.
  382. `X W'
  383. `C-x C-w'
  384.      Write current buffer into the specified file.
  385. `X I'
  386. `C-x C-i'
  387.      Insert specified file at point.
  388. File: vip,  Node: Misc Commands,  Next: Vi Commands,  Prev: File Commands,  Up: Differences from Vi
  389. Miscellaneous Commands
  390. ----------------------
  391. `X ('
  392. `C-x ('
  393.      Start remembering keyboard macro.
  394. `X )'
  395. `C-x )'
  396.      Finish remembering keyboard macro.
  397.      Call last remembered keyboard macro.
  398. `X Z'
  399. `C-x C-z'
  400.      Suspend Emacs.
  401. `Z Z'
  402.      Exit Emacs.
  403.      Query replace.
  404.      Replace.
  405. File: vip,  Node: Vi Commands,  Next: Numeric Arguments,  Prev: Misc Commands,  Up: Top
  406. Vi Commands
  407. ***********
  408.    This chapter describes Vi commands other than Ex commands
  409. implemented in VIP.  Except for the last section which discusses insert
  410. mode, all the commands described in this chapter are to be used in vi
  411. mode.
  412. * Menu:
  413. * Numeric Arguments::    Many commands accept numeric arguments
  414. * Important Keys::    Some very important keys.
  415. * Buffers and Windows::    Commands for handling buffers and windows.
  416. * Files::        Commands for handling files.
  417. * Viewing the Buffer::    How you can view the current buffer.
  418. * Mark Commands::    Marking positions in a buffer.
  419. * Motion Commands::    Commands for moving point.
  420. * Searching and Replacing::    Commands for searching and replacing.
  421. * Modifying Commands::    Commands for modifying the buffer.
  422. * Other Vi Commands::    Miscellaneous Commands.
  423. * Commands in Insert Mode::    Commands for entering insert mode.
  424. File: vip,  Node: Numeric Arguments,  Next: Important Keys,  Prev: Vi Commands,  Up: Vi Commands
  425. Numeric Arguments
  426. =================
  427.    Most Vi commands accept a "numeric argument" which can be supplied as
  428. a prefix to the commands.  A numeric argument is also called a "count".
  429. In many cases, if a count is given, the command is executed that many
  430. times.  For instance, `5 d d' deletes 5 lines while simple `d d'
  431. deletes a line.  In this manual the metavariable N will denote a count.
  432. File: vip,  Node: Important Keys,  Next: Buffers and Windows,  Prev: Numeric Arguments,  Up: Vi Commands
  433. Important Keys
  434. ==============
  435.    The keys `C-g' and `C-l' are unique in that their associated
  436. functions are the same in any of emacs, vi and insert mode.
  437. `C-g'
  438.      Quit.  Cancel running or partially typed command (`keyboard-quit').
  439. `C-l'
  440.      Clear the screen and reprint everything (`recenter').
  441.    In Emacs many commands are bound to the key strokes that start with
  442. `C-x', `C-c' and ESC.  These commands can be accessed from vi mode as
  443. easily as from emacs mode.
  444. `C-x'
  445. `C-c'
  446. `ESC'
  447.      Typing one of these keys have the same effect as typing it in
  448.      emacs mode.  Appropriate command will be executed according as the
  449.      keys you type after it.  You will be in vi mode again after the
  450.      execution of the command.  For instance, if you type `ESC <' (in
  451.      vi mode) then the cursor will move to the beginning of the buffer
  452.      and you will still be in vi mode.
  453.      Typing one of these keys have the effect of typing the
  454.      corresponding control character in emacs mode.  Moreover, if you
  455.      type an upper case character following it, that character will
  456.      also be translated to the corresponding control character.  Thus
  457.      typing `X W' in vi mode is the same as typing `C-x C-w' in emacs
  458.      mode.  You will be in vi mode again after the execution of a
  459.      command.
  460.      Escape to emacs mode.  Hitting the `\' key will take you to emacs
  461.      mode, and you can execute a single Emacs command.  After executing
  462.      the Emacs command you will be in vi mode again.  You can give a
  463.      count before typing `\'.  Thus `5 \ +', as well as `\ C-u 5 +',
  464.      will insert `+++++' before point.
  465. File: vip,  Node: Buffers and Windows,  Next: Files,  Prev: Important Keys,  Up: Vi Commands
  466. Buffers and Windows
  467. ===================
  468.    In Emacs the text you edit is stored in a "buffer".  See GNU Emacs
  469. Manual, for details.  There is always one "selected" buffer which is
  470. called the "current buffer".
  471.    You can see the contents of buffers through "windows" created by
  472. Emacs.  When you have multiple windows on the screen only one of them
  473. is selected.  Each buffer has a unique name, and each window has a mode
  474. line which shows the name of the buffer associated with the window and
  475. other information about the status of the buffer.  You can change the
  476. format of the mode line, but normally if you see `**' at the beginning
  477. of a mode line it means that the buffer is "modified".  If you write
  478. out the content of the buffer to a file, then the buffer will become
  479. not modified.  Also if you see `%%' at the beginning of the mode line,
  480. it means that the file associated with the buffer is write protected.
  481.    We have the following commands related to windows and buffers.
  482. `C-n'
  483.      Move cursor to the next-window (`vip-next-window').
  484. `X 1'
  485.      Delete other windows and make the selected window fill the screen
  486.      (`delete-other-windows').
  487. `X 2'
  488.      Split current window into two windows (`split-window-vertically').
  489. `X 3'
  490.      Show current buffer in two windows.
  491. `s BUFFER RET'
  492.      Select or create a buffer named BUFFER (`vip-switch-to-buffer').
  493. `S BUFFER RET'
  494.      Similar but select a buffer named BUFFER in another window
  495.      (`vip-switch-to-buffer-other-window').
  496.      Kill the current buffer if it is not modified or if it is not
  497.      associated with a file
  498.      (`vip-kill-buffer').
  499. `X B'
  500.      List the existing buffers (`list-buffers').
  501.    As "buffer name completion" is provided, you have only to type in
  502. initial substring of the buffer name which is sufficient to identify it
  503. among names of existing buffers.  After that, if you hit TAB the rest
  504. of the buffer name will be supplied by the system, and you can confirm
  505. it by RET.  The default buffer name to switch to will also be prompted,
  506. and you can select it by giving a simple RET.  See GNU Emacs Manual for
  507. details of completion.
  508. File: vip,  Node: Files,  Next: Viewing the Buffer,  Prev: Buffers and Windows,  Up: Vi Commands
  509. Files
  510. =====
  511.    We have the following commands related to files.  They are used to
  512. visit, save and insert files.
  513. `v FILE RET'
  514.      Visit specified file in the current window (`vip-find-file').
  515. `V FILE RET'
  516.      Visit specified file in another window
  517.      (`vip-find-file-other-window').
  518. `X S'
  519.      Save current buffer to the file associated with the buffer.  If no
  520.      file is associated with the buffer, the name of the file to write
  521.      out the content of the buffer will be asked in the minibuffer.
  522. `X W FILE RET'
  523.      Write current buffer into a specified file.
  524. `X I FILE RET'
  525.      Insert a specified file at point.
  526.      Give information on the file associated with the current buffer.
  527.      Tell you the name of the file associated with the buffer, the line
  528.      number of the current point and total line numbers in the buffer.
  529.      If no file is associated with the buffer, this fact will be
  530.      indicated by the null file name `""'.
  531.    In Emacs, you can edit a file by "visiting" it.  If you wish to
  532. visit a file in the current window, you can just type `v'.  Emacs
  533. maintains the "default directory" which is specific to each buffer.
  534. Suppose, for instance, that the default directory of the current buffer
  535. is `/usr/masahiko/lisp/'.  Then you will get the following prompt in the
  536. minibuffer.
  537.      visit file: /usr/masahiko/lisp/
  538. If you wish to visit, say, `vip.el' in this directory, then you can
  539. just type `vip.el' followed by RET.  If the file `vip.el' already
  540. exists in the directory, Emacs will visit that file, and if not, the
  541. file will be created.  Emacs will use the file name (`vip.el', in this
  542. case) as the name of the buffer visiting the file.  In order to make
  543. the buffer name unique, Emacs may append `<2>', `<3>' etc., to the
  544. buffer name.  As the "file name completion" is provided here, you can
  545. sometime save typing.  For instance, suppose there is only one file in
  546. the default directory whose name starts with `v', that is `vip.el'.
  547. Then if you just type `v TAB' then it will be completed to `vip.el'.
  548. Thus, in this case, you just have to type `v v TAB RET' to visit
  549. `/usr/masahiko/lisp/vip.el'.  Continuing the example, let us now
  550. suppose that you wished to visit the file
  551. `/usr/masahiko/man/vip.texinfo'.  Then to the same prompt which you get
  552. after you typed `v', you can enter `/usr/masahiko/man/vip.texinfo' or
  553. `../man/vip.texinfo' followed by RET.
  554.    Use `V' instead of `v', if you wish to visit a file in another
  555. window.
  556.    You can verify which file you are editing by typing `g'.  (You can
  557. also type `X B' to get nformation on other buffers too.)  If you type
  558. `g' you will get an information like below in the echo area:
  559.      "/usr/masahiko/man/vip.texinfo" line 921 of 1949
  560.    After you edited the buffer (`vip.texinfo', in our example) for a
  561. while, you may wish to save it in a file.  If you wish to save it in
  562. the file associated with the buffer (`/usr/masahiko/man/vip.texinfo',
  563. in this case), you can just say `X S'.  If you wish to save it in
  564. another file, you can type `X W'.  You will then get a similar prompt
  565. as you get for `v', to which you can enter the file name.
  566. File: vip,  Node: Viewing the Buffer,  Next: Mark Commands,  Prev: Files,  Up: Vi Commands
  567. Viewing the Buffer
  568. ==================
  569.    In this and next section we discuss commands for moving around in the
  570. buffer.  These command do not change the content of the buffer.  The
  571. following commands are useful for viewing the content of the current
  572. buffer.
  573. `SPC'
  574. `C-f'
  575.      Scroll text of current window upward almost full screen.  You can
  576.      go forward in the buffer by this command (`vip-scroll').
  577. `RET'
  578. `C-b'
  579.      Scroll text of current window downward almost full screen.  You
  580.      can go backward in the buffer by this command (`vip-scroll-back').
  581. `C-d'
  582.      Scroll text of current window upward half screen.  You can go down
  583.      in the buffer by this command (`vip-scroll-down').
  584. `C-u'
  585.      Scroll text of current window downward half screen.  You can go up
  586.      in the buffer by this command (`vip-scroll-up').
  587. `C-y'
  588.      Scroll text of current window upward by one line
  589.      (`vip-scroll-down-one').
  590. `C-e'
  591.      Scroll text of current window downward by one line
  592.      (`vip-scroll-up-one').
  593. You can repeat these commands by giving a count.  Thus, `2 SPC' has the
  594. same effect as `SPC SPC'.
  595.    The following commands reposition point in the window.
  596. `z H'
  597. `z RET'
  598.      Put point on the top (home) line in the window.  So the current
  599.      line becomes the top line in the window.  Given a count N, point
  600.      will be placed in the N-th line from top (`vip-line-to-top').
  601. `z M'
  602. `z .'
  603.      Put point on the middle line in the window.  Given a count N,
  604.      point will be placed in the N-th line from the middle line
  605.      (`vip-line-to-middle').
  606. `z L'
  607. `z -'
  608.      Put point on the bottom line in the window.  Given a count N,
  609.      point will be placed in the N-th line from bottom
  610.      (`vip-line-to-bottom').
  611. `C-l'
  612.      Center point in window and redisplay screen (`recenter').
  613. File: vip,  Node: Mark Commands,  Next: Motion Commands,  Prev: Viewing the Buffer,  Up: Vi Commands
  614. Mark Commands
  615. =============
  616.    The following commands are used to mark positions in the buffer.
  617. `m CH'
  618.      Store current point in the register CH.  CH must be a lower case
  619.      character between `a' and `z'.
  620. `m <'
  621.      Set mark at the beginning of current buffer.
  622. `m >'
  623.      Set mark at the end of current buffer.
  624. `m .'
  625.      Set mark at point.
  626. `m ,'
  627.      Jump to mark (and pop mark off the mark ring).
  628.    Emacs uses the "mark ring" to store marked positions.  The commands
  629. `m <', `m >' and `m .' not only set mark but also add it as the latest
  630. element of the mark ring (replacing the oldest one).  By repeating the
  631. command ``m ,'' you can visit older and older marked positions.  You
  632. will eventually be in a loop as the mark ring is a ring.
  633. File: vip,  Node: Motion Commands,  Next: Searching and Replacing,  Prev: Mark Commands,  Up: Vi Commands
  634. Motion Commands
  635. ===============
  636.    Commands for moving around in the current buffer are collected here.
  637. These commands are used as an `argument' for the delete, change and
  638. yank commands to be described in the next section.
  639.      Move point backward by one character.  Signal error if point is at
  640.      the beginning of buffer, but (unlike Vi) do not complain otherwise
  641.      (`vip-backward-char').
  642.      Move point backward by one character.  Signal error if point is at
  643.      the end of buffer, but (unlike Vi) do not complain otherwise
  644.      (`vip-forward-char').
  645.      Move point to the next line keeping the current column.  If point
  646.      is on the last line of the buffer, a new line will be created and
  647.      point will move to that line (`vip-next-line').
  648.      Move point to the previous line keeping the current column
  649.      (`vip-next-line').
  650.      Move point to the next line at the first non-white character.  If
  651.      point is on the last line of the buffer, a new line will be
  652.      created and point will move to the beginning of that line
  653.      (`vip-next-line-at-bol').
  654.      Move point to the previous line at the first non-white character
  655.      (`vip-previous-line-at-bol').
  656. If a count is given to these commands, the commands will be repeated
  657. that many times.
  658.      Move point to the beginning of line (`vip-beginning-of-line').
  659.      Move point to the first non-white character on the line
  660.      (`vip-bol-and-skip-white').
  661.      Move point to the end of line (`vip-goto-eol').
  662. `N |'
  663.      Move point to the N-th column on the line (`vip-goto-col').
  664. Except for the `|' command, these commands neglect a count.
  665.      Move point forward to the beginning of the next word
  666.      (`vip-forward-word').
  667.      Move point forward to the beginning of the next word, where a
  668.      "word" is considered as a sequence of non-white characters
  669.      (`vip-forward-Word').
  670.      Move point backward to the beginning of a word
  671.      (`vip-backward-word').
  672.      Move point backward to the beginning of a word, where a word is
  673.      considered as a sequence of non-white characters
  674.      (`vip-forward-Word').
  675.      Move point forward to the end of a word (`vip-end-of-word').
  676.      Move point forward to the end of a word, where a word is
  677.      considered as a sequence of non-white characters
  678.      (`vip-end-of-Word').
  679. Here the meaning of the word `word' for the `w', `b' and `e' commands
  680. is determined by the "syntax table" effective in the current buffer.
  681. Each major mode has its syntax mode, and therefore the meaning of a
  682. word also changes as the major mode changes.  See GNU Emacs Manual for
  683. details of syntax table.
  684.      Move point to the beginning of the home (top) line of the window.
  685.      Given a count N, go to the N-th line from top (`vip-window-top').
  686.      Move point to the beginning of the middle line of the window.
  687.      Given a count N, go to the N-th line from the middle line
  688.      (`vip-window-middle').
  689.      Move point to the beginning of the lowest (bottom) line of the
  690.      window.  Given count, go to the N-th line from bottom
  691.      (`vip-window-bottom').
  692. These commands can be used to go to the desired line visible on the
  693. screen.
  694.      Move point backward to the beginning of the sentence
  695.      (`vip-backward-sentence').
  696.      Move point forward to the end of the sentence
  697.      (`vip-forward-sentence').
  698.      Move point backward to the beginning of the paragraph
  699.      (`vip-backward-paragraph').
  700.      Move point forward to the end of the paragraph
  701.      (`vip-forward-paragraph').
  702. A count repeats the effect for these commands.
  703.      Given a count N, move point to the N-th line in the buffer on the
  704.      first non-white character.  Without a count, go to the end of the
  705.      buffer (`vip-goto-line').
  706. `` `'
  707.      Exchange point and mark (`vip-goto-mark').
  708. `` CH'
  709.      Move point to the position stored in the register CH.  CH must be
  710.      a lower case letter.
  711. `' ''
  712.      Exchange point and mark, and then move point to the first non-white
  713.      character on the line (`vip-goto-mark-and-skip-white').
  714. `' CH'
  715.      Move point to the position stored in the register CH and skip to
  716.      the first non-white character on the line.  CH must be a lower
  717.      case letter.
  718.      Move point to the matching parenthesis if point is looking at `(',
  719.      `)', `{', `}', `[' or `]'
  720.      (`vip-paren-match').
  721. The command `G' mark point before move, so that you can return to the
  722. original point by `` `'.  The original point will also be stored in the
  723. mark ring.
  724.    The following commands are useful for moving points on the line.  A
  725. count will repeat the effect.
  726. `f CH'
  727.      Move point forward to the character CH on the line.  Signal error
  728.      if CH could not be found (`vip-find-char-forward').
  729. `F CH'
  730.      Move point backward to the character CH on the line.  Signal error
  731.      if CH could not be found (`vip-find-char-backward').
  732. `t CH'
  733.      Move point forward upto the character CH on the line.  Signal
  734.      error if CH could not be found (`vip-goto-char-forward').
  735. `T CH'
  736.      Move point backward upto the character CH on the line.  Signal
  737.      error if CH could not be found (`vip-goto-char-backward').
  738.      Repeat previous `f', `t', `F' or `T' command (`vip-repeat-find').
  739.      Repeat previous `f', `t', `F' or `T' command, in the opposite
  740.      direction (`vip-repeat-find-opposite').
  741. File: vip,  Node: Searching and Replacing,  Next: Modifying Commands,  Prev: Motion Commands,  Up: Vi Commands
  742. Searching and Replacing
  743. =======================
  744.    Following commands are available for searching and replacing.
  745. `/ STRING RET'
  746.      Search the first occurrence of the string STRING forward starting
  747.      from point.  Given a count N, the N-th occurrence of STRING will
  748.      be searched.  If the variable `vip-re-search' has value `t' then
  749.      "regular expression" search is done and the string matching the
  750.      regular expression STRING is found.  If you give an empty string
  751.      as STRING then the search mode will change from vanilla search to
  752.      regular expression search and vice versa (`vip-search-forward').
  753. `? STRING RET'
  754.      Same as `/', except that search is done backward
  755.      (`vip-search-backward').
  756.      Search the previous search pattern in the same direction as before
  757.      (`vip-search-next').
  758.      Search the previous search pattern in the opposite direction
  759.      (`vip-search-Next').
  760. `C-s'
  761.      Search forward incrementally.  See GNU Emacs Manual for details
  762.      (`isearch-forward').
  763. `C-r'
  764.      Search backward incrementally (`isearch-backward').
  765. `R STRING RET NEWSTRING'
  766.      There are two modes of replacement, "vanilla" and "regular
  767.      expression".  If the mode is vanilla you will get a prompt
  768.      `Replace string:', and if the mode is regular expression you will
  769.      ge a prompt `Replace regexp:'.  The mode is initially vanilla, but
  770.      you can toggle these modes by giving a null string as STRING.  If
  771.      the mode is vanilla, this command replaces every occurrence of
  772.      STRING with NEWSTRING.  If the mode is regular expression, STRING
  773.      is treated as a regular expression and every string matching the
  774.      regular expression is replaced with NEWSTRING
  775.      (`vip-replace-string').
  776. `Q    STRING RET NEWSTRING'
  777.      Same as `R' except that you will be asked form confirmation before
  778.      each replacement
  779.      (`vip-query-replace').
  780. `r CH'
  781.      Replace the character point is looking at by the character CH.
  782.      Give count, replace that many characters by CH
  783.      (`vip-replace-char').
  784. The commands `/' and `?' mark point before move, so that you can return
  785. to the original point by `` `'.
  786. File: vip,  Node: Modifying Commands,  Next: Delete Commands,  Prev: Searching and Replacing,  Up: Vi Commands
  787. Modifying Commands
  788. ==================
  789.    In this section, commands for modifying the content of a buffer are
  790. described.  These commands affect the region determined by a motion
  791. command which is given to the commands as their argument.
  792.    We classify motion commands into "point commands" and "line
  793. commands".  The point commands are as follows:
  794.      `h', `l', `0', `^', `$', `w', `W', `b', `B', `e', `E', `(', `)', `/', `?', ``', `f', `F', `t', `T', `%', `;', `,'
  795. The line commands are as follows:
  796.      `j', `k', `+', `-', `H', `M', `L', `{', `}', `G', `''
  797. If a point command is given as an argument to a modifying command, the
  798. region determined by the point command will be affected by the modifying
  799. command. On the other hand, if a line command is given as an argument
  800. to a modifying command, the region determined by the line command will
  801. be enlarged so that it will become the smallest region properly
  802. containing the region and consisting of whole lines (we call this
  803. process "expanding the region"), and then the enlarged region will be
  804. affected by the modifying command.
  805. * Menu:
  806. * Delete Commands::    Commands for deleting text.
  807. * Yank Commands::    Commands for yanking text in Vi's sense.
  808. * Put Back Commands::    Commands for putting back deleted/yanked text.
  809. * Change Commands::    Commands for changing text.
  810. * Repeating and Undoing Modifications::
  811. File: vip,  Node: Delete Commands,  Next: Yank Commands,  Prev: Modifying Commands,  Up: Modifying Commands
  812. Delete Commands
  813. ---------------
  814. `d MOTION-COMMAND'
  815.      Delete the region determined by the motion command MOTION-COMMAND.
  816. For example, `d $' will delete the region between point and end of
  817. current line since `$' is a point command that moves point to end of
  818. line.  `d G' will delete the region between the beginning of current
  819. line and end of the buffer, since `G' is a line command.  A count given
  820. to the command above will become the count for the associated motion
  821. command.  Thus, `3 d w' will delete three words.
  822.    It is also possible to save the deleted text into a register you
  823. specify.  For example, you can say `" t 3 d w' to delete three words
  824. and save it to register `t'.  The name of a register is a lower case
  825. letter between `a' and `z'.  If you give an upper case letter as an
  826. argument to a delete command, then the deleted text will be appended to
  827. the content of the register having the corresponding lower case letter
  828. as its name.  So, `" T d w' will delete a word and append it to
  829. register `t'.  Other modifying commands also accept a register name as
  830. their argument, and we will not repeat similar explanations.
  831.    We have more delete commands as below.
  832. `d d'
  833.      Delete a line.  Given a count N, delete N lines.
  834. `d r'
  835.      Delete current region.
  836. `d R'
  837.      Expand current region and delete it.
  838.      Delete to the end of a line (`vip-kill-line').
  839.      Delete a character after point.  Given N, delete N characters
  840.      (`vip-delete-char').
  841. `DEL'
  842.      Delete a character before point.  Given N, delete N characters
  843.      (`vip-delete-backward-char').
  844. File: vip,  Node: Yank Commands,  Next: Put Back Commands,  Prev: Delete Commands,  Up: Modifying Commands
  845. Yank Commands
  846. -------------
  847.    Yank commands "yank" a text of buffer into a (usually anonymous)
  848. register.  Here the word `yank' is used in Vi's sense.  Thus yank
  849. commands do not alter the content of the buffer, and useful only in
  850. combination with commands that put back the yanked text into the buffer.
  851. `y MOTION-COMMAND'
  852.      Yank the region determined by the motion command MOTION-COMMAND.
  853. For example, `y $' will yank the text between point and the end of line
  854. into an anonymous register, while `"c y $' will yank the same text into
  855. register `c'.
  856.    Use the following command to yank consecutive lines of text.
  857. `y y'
  858.      Yank a line.  Given N, yank N lines (`vip-yank-line').
  859. `y r'
  860.      Yank current region.
  861. `y R'
  862.      Expand current region and yank it.
  863. File: vip,  Node: Put Back Commands,  Next: Change Commands,  Prev: Yank Commands,  Up: Modifying Commands
  864. Put Back Commands
  865. -----------------
  866.    Deleted or yanked texts can be put back into the buffer by the
  867. command below.
  868.      Insert, after the character point is looking at, most recently
  869.      deleted/yanked text from anonymous register. Given a register name
  870.      argument, the content of the named register will be put back.
  871.      Given a count, the command will be repeated that many times. This
  872.      command also checks if the text to put back ends with a new line
  873.      character, and if so the text will be put below the current line
  874.      (`vip-put-back').
  875.      Insert at point most recently deleted/yanked text from anonymous
  876.      register.  Given a register name argument, the content of the
  877.      named register will be put back.  Given a count, the command will
  878.      be repeated that many times.  This command also checks if the text
  879.      to put back ends with a new line character, and if so the text
  880.      will be put above the current line rather than at point
  881.      (`vip-Put-back').
  882. Thus, `" c p' will put back the content of the register `c' into the
  883. buffer.  It is also possible to specify "number register" which is a
  884. numeral between `1' and `9'.  If the number register N is specified,
  885. N-th previously deleted/yanked text will be put back.  It is an error
  886. to specify a number register for the delete/yank commands.
  887. File: vip,  Node: Change Commands,  Next: Repeating and Undoing Modifications,  Prev: Put Back Commands,  Up: Modifying Commands
  888. Change Commands
  889. ---------------
  890.    Most commonly used change command takes the following form.
  891. `c MOTION-COMMAND'
  892.      Replace the content of the region determined by the motion command
  893.      MOTION-COMMAND by the text you type.  If the motion command is a
  894.      point command then you will type the text into minibuffer, and if
  895.      the motion command is a line command then the region will be
  896.      deleted first and you can insert the text in INSERT MODE.
  897. For example, if point is at the beginning of a word `foo' and you wish
  898. to change it to `bar', you can type `c w'.  Then, as `w' is a point
  899. command, you will get the prompt `foo =>' in the minibuffer, for which
  900. you can type `b a r RET' to complete the change command.
  901. `c c'
  902.      Change a line.  Given a count, that many lines are changed.
  903. `c r'
  904.      Change current region.
  905. `c R'
  906.      Expand current region and change it.
  907. File: vip,  Node: Repeating and Undoing Modifications,  Next: Other Vi Commands,  Prev: Change Commands,  Up: Modifying Commands
  908. Repeating and Undoing Modifications
  909. -----------------------------------
  910.    VIP records the previous modifying command, so that it is easy to
  911. repeat it.  It is also very easy to undo changes made by modifying
  912. commands.
  913.      Undo the last change.  You can undo more by repeating undo by the
  914.      repeat command `.'.  For example, you can undo 5 previous changes
  915.      by typing `u....'.  If you type `uu', then the second `u' undoes
  916.      the first undo command (`vip-undo').
  917.      Repeat the last modifying command.  Given count N it becomes the
  918.      new count for the repeated command.  Otherwise, the count for the
  919.      last modifying command is used again (`vip-repeat').
  920. File: vip,  Node: Other Vi Commands,  Next: Commands in Insert Mode,  Prev: Repeating and Undoing Modifications,  Up: Vi Commands
  921. Other Vi Commands
  922. =================
  923.    Miscellaneous Vi commands are collected here.
  924. `Z Z'
  925.      Exit Emacs.  If modified buffers exist, you will be asked whether
  926.      you wish to save them or not (`save-buffers-kill-emacs').
  927. `! MOTION-COMMAND FORMAT-COMMAND'
  928. `N ! ! FORMAT-COMMAND'
  929.      The region determined by the motion command MOTION-COMMAND will be
  930.      given to the shell command FORMAT-COMMAND and the region will be
  931.      replaced by its output.  If a count is given, it will be passed to
  932.      MOTION-COMMAND.  For example, `3!Gsort' will sort the region
  933.      between point and the 3rd line.  If `!' is used instead of
  934.      MOTION-COMMAND then N lines will be processed by FORMAT-COMMAND
  935.      (`vip-command-argument').
  936.      Join two lines.  Given count, join that many lines.  A space will
  937.      be inserted at each junction (`vip-join-lines').
  938. `< MOTION-COMMAND'
  939. `N < <'
  940.      Shift region determined by the motion command MOTION-COMMAND to
  941.      left by SHIFT-WIDTH (default is 8).  If `<' is used instead of
  942.      MOTION-COMMAND then shift N lines
  943.      (`vip-command-argument').
  944. `> MOTION-COMMAND'
  945. `N > >'
  946.      Shift region determined by the motion command MOTION-COMMAND to
  947.      right by SHIFT-WIDTH (default is 8).  If `<' is used instead of
  948.      MOTION-COMMAND then shift N lines
  949.      (`vip-command-argument').
  950. `= MOTION-COMMAND'
  951.      Indent region determined by the motion command MOTION-COMMAND.  If
  952.      `=' is used instead of MOTION-COMMAND then indent N lines
  953.      (`vip-command-argument').
  954.      Call last remembered keyboard macro.
  955.      A new vi operator. *Note New Commands::, for more details.
  956.    The following keys are reserved for future extensions, and currently
  957. assigned to a function that just beeps (`vip-nil').
  958.      &, @, U, [, ], _, q, ~
  959.    VIP uses a special local keymap to interpret key strokes you enter
  960. in vi mode.  The following keys are bound to NIL in the keymap.
  961. Therefore, these keys are interpreted by the global keymap of Emacs.
  962. We give below a short description of the functions bound to these keys
  963. in the global keymap.  See GNU Emacs Manual for details.
  964. `C-@'
  965.      Set mark and push previous mark on mark ring (`set-mark-command').
  966. `TAB'
  967.      Indent line for current major mode (`indent-for-tab-command').
  968. `LFD'
  969.      Insert a newline, then indent according to mode
  970.      (`newline-and-indent').
  971. `C-k'
  972.      Kill the rest of the current line; before a newline, kill the
  973.      newline.  With a numeric argument, kill that many lines from
  974.      point.  Negative arguments kill lines backward (`kill-line').
  975. `C-l'
  976.      Clear the screen and reprint everything (`recenter').
  977. `N C-p'
  978.      Move cursor vertically up N lines (`previous-line').
  979. `C-q'
  980.      Read next input character and insert it.  Useful for inserting
  981.      control characters
  982.      (`quoted-insert').
  983. `C-r'
  984.      Search backward incrementally (`isearch-backward').
  985. `C-s'
  986.      Search forward incrementally (`isearch-forward').
  987. `N C-t'
  988.      Interchange characters around point, moving forward one character.
  989.      With count N, take character before point and drag it forward
  990.      past N other characters.  If no argument and at end of line, the
  991.      previous two characters are exchanged (`transpose-chars').
  992. `N C-v'
  993.      Scroll text upward N lines.  If N is not given, scroll near full
  994.      screen (`scroll-up').
  995. `C-w'
  996.      Kill between point and mark.  The text is save in the kill ring.
  997.      The command `P' or `p' can retrieve it from kill ring
  998.      (`kill-region').
  999.